<div class="container-fluid" ng-controller="ChargeApplyController">
    <form ng-show="!chargeCtrl.chargeResult" name="chargeApplyForm" novalidate="novalidate">
        <div class="form-group">
            <label for="chargetAmount">充值金额</label>
            <input type="number" class="form-control" id="chargetAmount" name="chargetAmount" ng-model="chargeCtrl.charge.amount" placeholder="充值金额" required>
            <div  ng-show="chargeApplyForm.curr_pwd.$error.required" class="form-input-error">充值金额必须填写！</div>
        </div>
        <div class="form-group">
            <label for="chargeType">充值类型</label>
            <select id="chargeType" class="form-control" name="chargeType" ng-model="chargeCtrl.charge.charge_type">
                <option value="wechat" selected="selected">微信</option>
                <option value="bank">银行</option>
                <option value="alipay">支付宝</option>
            </select>
        </div>
        <button  class="btn btn-default"  ng-disabled="chargeApplyForm.$invalid"  ng-click="chargeCtrl.chargeNow()">立即充值</button>
    </form>
    <div ng-show="chargeCtrl.chargeResult">
        <div class="row">
            <div class="col-lg-12 col-md-12">
                <table class="table table-hover">
                    <tr>
                        <td>订单号</td>
                        <td>{{chargeCtrl.chargeResult.pay_order_id}}</td>
                    </tr>
                    <tr>
                        <td>金额</td>
                        <td>{{chargeCtrl.chargeResult.amount | currency:"￥"}}</td>
                    </tr>
                    <tr>
                        <td>充值类型</td>
                        <td>{{chargeCtrl.chargeResult.charge_type_name}}</td>
                    </tr>
                    <tr ng-show="chargeCtrl.chargeResult.charge_type=='bank'">
                        <td>银行</td>
                        <td>{{chargeCtrl.chargeResult.bank_branch_name}}</td>
                    </tr>
                    <tr>
                        <td>付款账户名</td>
                        <td>{{chargeCtrl.chargeResult.rec_account_name}}</td>
                    </tr>
                    <tr>
                        <td>付款账号</td>
                        <td>{{chargeCtrl.chargeResult.rec_account_no}}</td>
                    </tr>
                    <tr>
                        <td>订单生成时间</td>
                        <td>{{chargeCtrl.chargeResult.created_time }}</td>
                    </tr>
                    <tr>
                        <td>订单过期时间</td>
                        <td>{{chargeCtrl.chargeResult.expire_time }}</td>
                    </tr>
                    <tr>
                        <td>状态说明</td>
                        <td>{{chargeCtrl.chargeResult.status_name }}</td>
                    </tr>
                    <tr>
                        <td>附言</td>
                        <td>
                            <p>{{chargeCtrl.chargeResult.comments}}</p>
                            <p style="color: red;">务必要在转账留言中写入附言内容。</p>
                        </td>
                    </tr>
                    <tr ng-show="chargeCtrl.chargeResult.charge_type=='wechat' || chargeCtrl.chargeResult.charge_type=='alipay'">
                        <td>付款二维码</td>
                        <td><img src="{{chargeCtrl.chargeResult.wechat_qrcode_url }}" alt="二维码"></td>
                    </tr>
                    <!-- tr>
                        <td colspan="2"><button class="btn btn-success" ng-click="chargeCtrl.chargeAgain()">继续充值</button></td>
                    </tr -->
                    <tr>
                        <td colspan="2"><button class="btn btn-warning" ng-click="chargeCtrl.cancelCharge(chargeCtrl.chargeResult.pay_order_id)">取消充值</button></td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</div>